package ar.edu.itba.it.cg.grupo01.api;

import java.util.Set;

import javax.vecmath.Point3d;

public interface Intersection<T> {

	/**
	 * Returns the points where the objects intersect. If
	 * {@link #getIntersections()} returns {@code false} then this method
	 * returns an empty {@link Set}
	 * 
	 * @return
	 */
	Set<Point3d> getIntersections();

	/**
	 * Returns the intersection object
	 */
	T getObject();
	
	/**
	 * Returns if this intersection has any results
	 * 
	 * @return true if there are any intersections, false otherwise
	 */
	boolean intersects();

	/**
	 * Returns the minimum distance to this point
	 * @param point
	 * @return minimum distance
	 */
	double distance(Point3d point);

	Point3d closestTo(Point3d origin);
}
